package dao;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class OutputFile {

	private BufferedWriter bw;
	public void open(String filename) {
		try {
			bw = new BufferedWriter(new FileWriter(filename));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}
	
	public void write(String line) {
		try {
			bw.write(line);
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}
	
	public void close() {
		try {
			bw.close();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}
}
